home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 54455 / 54455.xpi / chrome / content / options.js < prev    next >
Text File  |  2009-12-25  |  3KB  |  69 lines

  1. var tempbg= navigator.preference("extensions.passfinder.fgc");
  2. var tempfg= navigator.preference("extensions.passfinder.bgc");
  3. //var tempb= navigator.preference("extensions.passfinder.bold");
  4. //var tempi= navigator.preference("extensions.passfinder.ital");
  5.  
  6.  
  7. function init(){
  8.             if(navigator.preference(!"browser.display.use_focus_colors") || !navigator.preference("extensions.passfinder.cuscol")){
  9.                 document.getElementById("cuscol").checked = false;
  10.                 document.getElementById("fc").disabled = true;
  11.                 document.getElementById("bc").disabled = true;
  12.             }else if(navigator.preference("extensions.passfinder.cbcuscol")){
  13.                 document.getElementById("fc").disabled = false;
  14.                 document.getElementById("bc").disabled = false;
  15.                 document.getElementById("fc").color = navigator.preference("extensions.passfinder.fgc");
  16.                 document.getElementById("bc").color = navigator.preference("extensions.passfinder.bgc");
  17.             }
  18.             
  19.             //if(navigator.preference("extensions.passfinder.bold")){
  20.             //    document.getElementById("pbold").checked = false;
  21.             //}else{
  22.             //document.getElementById("pbold").checked = true;
  23.             //}
  24.             
  25.             //if(navigator.preference("extensions.passfinder.ital")){
  26.             //document.getElementById("pital").checked = false;
  27.             //}else{
  28.             //document.getElementById("pital").checked = true;
  29.             //}
  30.             
  31.         }
  32.  
  33.  
  34.         function cuscolToggle(){
  35.                 if(document.getElementById("cbcuscol").checked)
  36.                 {
  37.                     if(navigator.preference("browser.display.use_focus_colors"))
  38.                     {
  39.                         if(!confirm("You cannot use custom colors while your browser has 'focus colors' enabled.\r\n\r\nDo you wish to disable focus colors (recommended)?")){
  40.                             document.getElementById("cbcuscol").checked = false;
  41.                             return;
  42.                         }
  43.                         navigator.preference("browser.display.use_focus_colors", false);
  44.                     }
  45.                     document.getElementById("fc").disabled = false;
  46.                     document.getElementById("bc").disabled = false;
  47.                     document.getElementById("fc").color = navigator.preference("extensions.passfinder.fgc");
  48.                     document.getElementById("bc").color = navigator.preference("extensions.passfinder.bgc");
  49.                 }else{
  50.                     document.getElementById("fc").disabled = true;
  51.                     document.getElementById("bc").disabled = true;
  52.                     document.getElementById("fc").color = "";
  53.                     document.getElementById("bc").color = "";
  54.                 }
  55.         }
  56.         
  57.        function doOK(){
  58.         navigator.preference("extensions.passfinder.fgc", document.getElementById("fc").color);
  59.         navigator.preference("extensions.passfinder.bgc", document.getElementById("bc").color);
  60.         //navigator.preference("extensions.passfinder.bold", document.getElementById("pbold").checked);
  61.         //navigator.preference("extensions.passfinder.ital", document.getElementById("pital").checked);
  62.         }
  63.        
  64.         function doCancel(){
  65.         navigator.preference("extensions.passfinder.fgc", tempfg);
  66.         navigator.preference("extensions.passfinder.bgc", tempbg);
  67.         //navigator.preference("extensions.passfinder.bold", tempb);
  68.         //navigator.preference("extensions.passfinder.ital", tempi);
  69.        }